from google.appengine.ext import db

class Users(db.Model):
    Full_name = db.StringProperty(multiline=True)
    Screenname = db.StringProperty(multiline=True)
    Password = db.StringProperty(multiline=True)
    Created_at = db.DateTimeProperty(auto_now_add=True)
    Updated_at = db.DateTimeProperty(auto_now_add=True)

class Boards(db.Model):
    Name = db.StringProperty()
    Owner = db.StringProperty()
    Invitee = db.StringProperty()
    Status = db.StringProperty()
    Size = db.StringProperty()
    Current_board= db.StringProperty()
    Owner_is_white = db.StringProperty()
    Created_at = db.DateTimeProperty(auto_now_add=True)
    Updated_at = db.DateTimeProperty(auto_now_add=True)
    
class Request_or_invites(db.Model):
    Boards_id = db.ReferenceProperty(Boards)
    Requester = db.IntegerProperty()
    Inviter = db.IntegerProperty()
    Status = screenname = db.StringProperty()
    Created_at = db.DateTimeProperty(auto_now_add=True)
    Updated_at = db.DateTimeProperty(auto_now_add=True)

class Board_moves(db.Model):
    Board = db.StringProperty()
    Sequence_number = db.IntegerProperty()
    X_coordinate = db.StringProperty()
    Y_coordinate = db.StringProperty()
    Created_at = db.DateTimeProperty(auto_now_add=True)
    Updated_at = db.DateTimeProperty(auto_now_add=True)

